import {createBrowserRouter} from "react-router-dom";

import {Login} from "@/pages/Login";
import {AuthRoute} from "@/components/AuthRoute";
import GeekLayout from "@/pages/Layout";
import {Home} from "@/pages/Home";
import {Article} from "@/pages/Article";
import {Publish} from "@/pages/Publish/index";

const router = createBrowserRouter([
    {
        path: '/',
        element: <AuthRoute><GeekLayout/></AuthRoute>,
        children: [{
            path: '/',
            element: <Home></Home>
        }, {
            path: 'article',
            element: <Article></Article>
        }, {
            path: 'publish',
            element: <Publish></Publish>
        }]
    },
    {
        path: '/login',
        element: <Login/>
    }
])
export default router